package com.hlhj.funlike_businessqzxd.moudle;

import android.content.Context;

import com.example.mymvp.mvp.BaseModule;
import com.hlhj.funlike_businessqzxd.api.Apis;
import com.hlhj.funlike_businessqzxd.api.BaseObser;
import com.hlhj.funlike_businessqzxd.bean.MsgBean;
import com.lzy.okgo.model.Response;

public class TakeCircleMoudle implements BaseModule{
    public interface getResult{
        void loadResult(MsgBean msgBean);
    }
    public getResult lisenter;

    public void setLisenter(getResult lisenter) {
        this.lisenter = lisenter;
    }

    public void LoadShopCricle(Context context, String distance){
        Apis.INSTANCE.ShopCricle(distance)
                .subscribe(new BaseObser<Response<MsgBean>>(context) {
                    @Override
                    public void httpSuccess(Response<MsgBean> msgBeanResponse) {
                        if (lisenter!=null){
                            lisenter.loadResult(msgBeanResponse.body());
                        }
                    }
                });
    }
}
